"""student_study_sys URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.urls import re_path

import user_verify.views as uvv     #  用户验证

import stu_exam_manage.views as semv
import stu_exam_manage.utils.save_exams_xls as usxls
import stu_exam_manage.utils.save_exams_html as ushtml

urlpatterns = [
    path('admin/', admin.site.urls),

    # path('', semv.weihu),      # 正在维护

    # 用户登陆， 注册验证
    path('user_verify/login.html', uvv.login),
    path('user_verify/logout.html', uvv.logout),
    path('user_verify/register.html', uvv.regist),

    # 主页
    path('', semv.show),
    path('stu_exam_manage/base.html', semv.show),


    # 题库管理
    path('question_bank_base/1.html', semv.question_bank),
    path('question_bank_titles/', semv.question_bank_titles),
    path('question_bank_base/2.html', semv.jineng_bank),    # 技能题库
    path('jineng_bank_titles/', semv.jineng_bank_titles),       # 技能题目列表
    path('error_titles_submit.html/', semv.error_titles_submit),    #  错题提交
    path('question_bank_base/3.html', semv.error_titles_manage),    #  错题本记录
    path('question_bank_base/6.html', semv.interesting),    #  好玩的模块
    path('question_bank_base/4.html', semv.info_upd),    #  信息修改
    path('question_bank_base/5.html', semv.class_notice),    #  班级公告

    # -- 好玩模块 路径 ---
    path('interesting/histogram.html/', semv.interesting_histogram), # 柱状图
    path('interesting/tetris.html/', semv.interesting_tetris), # 俄罗斯方块
    path('interesting/calculator.html/', semv.interesting_calculator), # 科学计算器
    path('interesting/five_in_a_row.html/', semv.interesting_five_in_a_row), # 五子棋
    path('interesting/running_man.html/', semv.interesting_running_man), # 跑跑
    path('interesting/mouse_tail.html/', semv.interesting_mouse_tail), # 鼠标留尾
    path('interesting/game2048.html/', semv.interesting_game2048), # 2048
    path('interesting/zhiwujiangshi.html/', semv.interesting_zhiwujiangshi), # 2048

    # ----技能题库模块 技能数据文件路径---
    re_path(r'^download/jineng_data_file/(?P<file_name>.*)/$', semv.download_file),
    # --技能展示页面
    re_path(r'jineng_bank_titles/(?P<jineng_title_id>\d+).html/$', semv.jineng_bank_titles),


    # # ----xls格式理论题目的导入------
    # # **********一般处于关闭状态，进行测试升级时打开*************
    # path('save_new_xls_liluntitles/', usxls.save_new_xls_liluntitles), # 理论题目的导入
    # path('delete_all_xls_liluntitles/', usxls.delete_all_xls_liluntitles), # 清空所有的理论题表以及理论题目表
    #
    # # ----html格式理论题目的导入------
    # # **********一般处于关闭状态，进行测试升级时打开*************
    # path('save_new_html_liluntitles/', ushtml.save_new_html_liluntitles), # 理论题目的导入
    # path('delete_all_html_liluntitles/', ushtml.delete_all_html_liluntitles), # 清空所有的理论题表以及理论题目表


]



